//
//  FPDetailMovie.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/20.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPDetailMovie.h"

@implementation FPDetailMovie
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
        [self addSubview:backView];
        UIView *HeadView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kImageH(300))];
       
       
        self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth , kScreenHeight - 44)];
        [self addSubview:_tableView];
        self.tableView.tableHeaderView = HeadView;
        self.visual = [[FPVisualEffectView alloc]init];
        self.visual.frame = CGRectMake(0, 0, kScreenWidth , kImageH(150));
        self.visual.alpha = 0.8;
        self.visual.image = [UIImage imageNamed:@"2.jpg"];
        [HeadView addSubview:_visual];
        
        self.movieImage = [[UIImageView alloc]init];
        self.movieImage.frame = CGRectMake(kImageW(15), 64 + kImageH(5), kImageW(130), kImageH(200));
        self.movieImage.image = [UIImage imageNamed:@"296b467c57933f291a29e2c2255af022.jpg"];
        [HeadView addSubview:_movieImage];
        
        self.titleCn = [[UILabel alloc]init];
        self.titleCn.frame  = CGRectMake(_movieImage.width + kImageW(20), _movieImage.y , kImageW(200), kImageH(25));
        self.titleCn.textColor = [UIColor whiteColor];
        self.titleCn.font = [UIFont systemFontOfSize:20];
        [HeadView addSubview:_titleCn];
        
        
       
        
        self.titleEn = [[UILabel alloc]init];
        self.titleEn.frame = CGRectMake(_titleCn.x, _titleCn.y + kImageH(25), _titleCn.width, kImageH(20));
        self.titleEn.textColor = [UIColor whiteColor];
        self.titleEn.font = [UIFont systemFontOfSize:13];
        [HeadView addSubview:_titleEn];
        
        self.actor = [[UILabel alloc]init];
        self.actor.frame = CGRectMake( _titleCn.x, _titleEn.y + kImageH(25),_titleEn.width , kImageH(20));
        self.actor.textColor = [UIColor whiteColor];
        self.actor.font = [UIFont systemFontOfSize:13];
        [HeadView addSubview:_actor];
        
        self.timeShow = [[UILabel alloc]init];
        self.timeShow.frame = CGRectMake(_titleCn.x , _actor.y + kImageH(20), _titleEn.width, _titleEn.height);
        self.timeShow.textColor = [UIColor whiteColor];
        self.timeShow.font = [UIFont systemFontOfSize:13];
        [HeadView addSubview:_timeShow];
        
        self.ratingFinal = [[UILabel alloc]init];
        self.ratingFinal.frame = CGRectMake(_titleCn.x, _timeShow.x + _timeShow.height, _timeShow.width, _timeShow.height);
        self.ratingFinal.textColor = [UIColor whiteColor];
        self.ratingFinal.font = [UIFont systemFontOfSize:14];
        [HeadView addSubview:_ratingFinal];
        
        self.directorname = [[UILabel alloc]init];
        self.directorname.frame = CGRectMake(_ratingFinal.x, _ratingFinal.y + _ratingFinal.height + kImageH(5), _ratingFinal.width, kImageH(20));
        self.directorname.textColor = [UIColor whiteColor];
        self.directorname.font = [UIFont systemFontOfSize:15];
        [HeadView addSubview:_directorname];
        
        self.heartBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        self.heartBtn.frame = CGRectMake( _directorname.x, _directorname.y + _directorname.height, kImageW(100), kImageH(30));
        self.heartBtn.backgroundColor = [UIColor colorWithRed:0.121 green:0.533 blue:1.000 alpha:1.000];
        [self.heartBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.heartBtn.layer.cornerRadius = 15;
        [self.heartBtn setTitle:@"收藏" forState:UIControlStateNormal];
        [HeadView addSubview:_heartBtn];
        
        
        self.shareBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        self.shareBtn.frame = CGRectMake( _heartBtn.x + _heartBtn.width + kImageW(5), _directorname.y + _directorname.height, kImageW(100), kImageH(30));
        self.shareBtn.backgroundColor = [UIColor colorWithRed:0.121 green:0.533 blue:1.000 alpha:1.000];
        [self.shareBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.shareBtn.layer.cornerRadius = 15;
        [self.shareBtn setTitle:@"分享" forState:UIControlStateNormal];
        [HeadView addSubview:_shareBtn];
        
       
        
        
        
        
    }
    return self;
}






@end
